print backend: Fix list model handling in dispose
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Jun 2020 11:43:54 +0000 (07:43 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Jun 2020 17:52:21 +0000 (13:52 -0400)
commit7a50f86f3f3970d78cb207f74803c20897069718
tree3365ff8702b1b73bbe6a8a284db4c2d783664e63
parent59218d02c8b37c38cb0cc151c80712ff7078a836
print backend: Fix list model handling in dispose

The print backends do some complicated dispose handling
where the implementations call gtk_print_backend_destroy().

Our tests (in particular, the templates test) trigger
situations where we use print backends after dispose,
and they can't handle the printers listmodel being
NULL at that time. So just remove the printers in
dispose, keep the empty liststore until finalize.
gtk/gtkprintbackend.c